<include file="Public:header" />
<include file="Public:left" />
<style>
    .add_img .img_case{width: 100px;height: 100px;border:1px solid #000;margin: 0 10px 10px 0;}
    .add_img .img_case img{width: 100%;height:100%;}
    .add_img .img_case:last-child .ld_close{display:none}
    .add_img{display: flex;flex-wrap:wrap;margin: 15px 0 0 125px}
    #param-items tr td{margin-top: 10px;}
</style>
<form action="{:url('Code/edit')}" method="post" enctype="multipart/form-data" id="brandForm">
    <section>
        <h2><strong>编辑</strong></h2>
        <ul class="ulColumn2">
            <li>
                <span class="item_name" style="width:120px;">代码压缩包：</span>
                <input type="file" name="file" class="textbox textbox_295" id="file" value=""/>
            </li>
            <li>
                <span class="item_name" style="width:120px;">所属分类 ：</span>
                <select name="type" id="">
                    <option value="1" <if condition="isset($data.type) && $data.type =='1'">selected</if>>pc</option>
                    <option value="2" <if condition="isset($data.type) && $data.type =='2'">selected</if>>小程序</option>
                    <option value="3" <if condition="isset($data.type) && $data.type =='3'">selected</if>>app</option>
                </select>
            </li>
            <li>
                <span class="item_name" style="width:120px;">时间：</span>
                <input type="text" class="textbox textbox_295" name="createtime" id="timea" placeholder="时间..." value="{$data.createtime?$data.createtime:''}"/>
            </li>
            <li>
                <span class="item_name" style="width:120px;">项目详情：</span>
                <script id="editor" name="introduction" type="text" style="width:700px;height:300px;margin-left:125px; margin-top:-12px;">{$data.introduction?$data.introduction:'';}</script>
            </li>
            <input type="hidden" name="id" value="{$id?$id:''}">
            <li>
                <span class="item_name" style="width:120px;"></span>
                <input type="submit" class="link_btn" value="提交"/>
            </li>
        </ul>
    </section>
</form>
</div>
</section>
<script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script>
<script>
    laydate.render({
        elem: '#timea' //指定元素
        ,type:'datetime'
    });
</script>
<script type="text/javascript">

    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    var uea = UE.getEditor('editor');
    function isFocus(e){
        alert(UE.getEditor('editor').isFocus());
        UE.dom.domUtils.preventDefault(e)
    }
    function setblur(e){
        UE.getEditor('editor').blur();
        UE.dom.domUtils.preventDefault(e)
    }
    function insertHtml() {
        var value = prompt('插入html代码', '');
        UE.getEditor('editor').execCommand('insertHtml', value)
    }
    function createEditor() {
        enableBtn();
        UE.getEditor('editor');
    }
</script>
</body>
</html>
